import request from '@/utils/request'

// 查询检查详情列表
export function listCheckDetailed(DeptId) {
  return request({
    url: '/system/CheckDetailed/getCheckDetailedByDeptId/' + DeptId,
    method: 'get',
  })
}

export function listCheckDetailed1(query) {
  return request({
    url: '/system/CheckDetailed/list',
    method: 'get',
    params: {query}
  })
}

export function getDept(DeptId) {
  return request({
    url: '/system/CheckDetailed/getDeptName',
    method: 'get',
    params: {DeptId}
  })
}

export function setCheckState(Id, userId) {
  return request({
    url: '/system/CheckDetailed/setCheckState',
    method: 'get',
    params: {Id, userId}
  })
}

export function enter(CheckDetailed) {
  return request({
    url: '/system/CheckDetailed/enter',
    method: 'post',
    data: CheckDetailed
  })
}

// 查询检查详情详细
export function getCheckDetailed2(CheckState) {
  return request({
    url: '/system/CheckDetailed/CheckState',
    method: 'get',
    params: {CheckState}
  })
}

// 查询检查详情详细
export function getCheckDetailed1(MedicalId) {
  return request({
    url: '/system/CheckDetailed/MedicalId',
    method: 'get',
    params: {MedicalId}
  })
}

export function getByMedicalRecordId(MedicalId) {
  return request({
    url: '/system/CheckDetailed/getByMedicalRecordId',
    method: 'get',
    params: {
      MedicalId
    }
  })
}

// 新增检查详情
export function addCheckDetailed(data) {
  return request({
    url: '/system/CheckDetailed',
    method: 'post',
    data: data
  })
}

// 修改检查详情
export function updateCheckDetailed(data) {
  return request({
    url: '/system/CheckDetailed',
    method: 'put',
    data: data
  })
}

// 删除检查详情
export function delCheckDetailed(Id) {
  return request({
    url: '/system/CheckDetailed/' + Id,
    method: 'delete'
  })
}
